package com.groupname.dangerousdelves;

import android.graphics.RectF;
import java.util.Map;

// -------------------------------------------------------------------------
/**
 * Write a one-sentence summary of your class here. Follow it with additional
 * details about its purpose, what abstraction it represents, and how to use it.
 *
 * @author Chris Fieldman (Chrisf90)
 * @version 2012.11.20
 */
public class TileSelector
{
    // ~-------------------------------------------------------------------------
    // Methods
    /**
     * Place a description of your method here.
     *
     * @param type
     * @return
     */
    public Tile createTile(char type, RectF location)
    {
        switch (type)
        {
            case 'w':
            {
                return new ImovableTile(location);
            }
            case 'o':
            {
                return new MovableTile(location);
            }
            default:
            {
                throw new IllegalStateException("Cannot create tile of" +
                		" unknown type.");
            }
        }
    }
}
